package com.example.mapper;

import com.example.entity.SeatRecord;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface SeatRecordMapper {
    List<SeatRecord> selectAll(SeatRecord seatRecord);

    void insert(SeatRecord seatRecord);


    void updateById(SeatRecord seatRecord);

    @Delete("delete from `seat_record` where id=#{id}")
    void deleteById(Integer id);


    @Select("select * from seat_record where id=#{id}")
    SeatRecord selectById(Integer id);

    @Delete("delete from seat_record where seat_id=#{setId}")
    void deleteBySeatId(Integer setId);
}
